#ifndef SDLTEXT_H
#define SDLTEXT_H
#pragma warning( disable : 4290 )
class sdltext_error : public std::logic_error 
{
public:
	sdltext_error(const std::string &error) : logic_error(error) { }
};

class SDLText
{
private:
       struct SDL_Surface *txt_surface_;
       struct _TTF_Font *font_;
       struct SDL_Color *color_;
       struct SDL_Rect *dst_rect_;
public:
       SDLText(int x, int y, int r, int g, int b, int size, std::string font, std::string text) throw(sdltext_error);
       SDLText(int r, int g, int b, int size, std::string font, std::string text) throw(sdltext_error);
       ~SDLText();
       
       void set_pos(int x, int y);
       void set_text(std::string new_text) throw(sdltext_error);
       void render(struct SDL_Surface *dst_);
       int get_height() const;
       int get_width() const;
};
#endif